<template>
  <div class="navcrumb">
    <!-- template 不会渲染  可以直接写指令v- -->
    <template v-for="(item, index) in navs">
      <a href="#" :key="index">
        {{ item.name }}
      </a>
      <template v-if="index < navs.length - 1">/ </template>
    </template>

    <!--    [a,b,c,d]
  //     0 1 2 3  -->
  </div>
</template>

<script>
export default {
  props: ["navs"],
};
</script>

<style lang="less" scoped>
.navcrumb {
  margin-bottom: 10px;
  a {
    text-decoration: none;
    color: #000;
  }
}
</style>